
import { MongooseFactory } from "../kalend";
import { Schema } from "mongoose";

/** 商户评价表 */
const schema = MongooseFactory.Schema({
    merchantid: {
        type: Schema.Types.ObjectId,
        ref: "merchant"
    },
    customerid: {
        type: Schema.Types.ObjectId,
        ref: "customer_account"
    },
    orderid: {
        type: Schema.Types.ObjectId,
        ref: "customer_order"
    },
    star: {
        type: Number,
        default: 0
    },
    content: {
        type: String
    },
    lables: [{
        type: Schema.Types.Mixed
    }],
    imgs: [{
        type: String
    }],
    createuser: {
        type: Schema.Types.ObjectId,
        ref: "platform_user"
    },
    modifyuser: {
        type: Schema.Types.ObjectId,
        ref: "platform_user"
    },
    modifytime: {
        type: Date
    }
});



export const merchant_commentModel = MongooseFactory.Model("merchant_comment", schema);